package cn.pconline.autoclub.entity;

import java.util.Date;
import org.gelivable.dao.Column;
import org.gelivable.dao.Entity;
import org.gelivable.dao.Id;
import org.gelivable.dao.Transient;

/**
 *
 * @author wanganning
 */
@Entity(tableName = "ac_member_petrol_log", split="Date:createAt:m")
public class MemberPetrolLog implements EntityWithUserProp,EntityWithClubProp{

    @Id
    @Column(name = "id")
    private long id;
    @Column(name = "user_id")
    private long uid;
    @Column(name = "club_id")
    private long clubId;
    @Column(name = "create_at")
    private Date createAt;
    @Column(name = "reason")
    private String reason;
    @Column(name = "petrol")
    private int petrol;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Override
    public long getUid() {
        return uid;
    }

    @Override
    public void setUid(long uid) {
        this.uid = uid;
    }

    @Override
    public long getClubId() {
        return clubId;
    }

    @Override
    public void setClubId(long clubId) {
        this.clubId = clubId;
    }

    public Date getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Date createAt) {
        this.createAt = createAt;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public int getPetrol() {
        return petrol;
    }

    public void setPetrol(int petrol) {
        this.petrol = petrol;
    }

    @Transient(cache = false)
    private User user;
    @Transient(cache = false)
    private Club club;

    @Override
    public User getUser() {
        return user;
    }

    @Override
    public void setUser(User user) {
        this.user = user;
    }

    @Override
    public Club getClub() {
        return club;
    }

    @Override
    public void setClub(Club club) {
        this.club = club;
    }
}
